package com.gddb.xwj.weixin.service.impl;

import com.gddb.xwj.common.api.BaseApiService;
import com.gddb.xwj.entity.WeixinEntity;
import com.gddb.xwj.weixin.service.WeiXinService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @Author xuwj
 * @Description:
 * 1、entity中引如了common，service引入了entity,impl引入了service，所以可以直接用common
 * 2、接口型，所以命名是Service 不是Controller
 * 3、接口中已经有映射了，所以重写不需要映射
 * @CreateTime 2020/5/10 20:12
 * @Version 1.0
 */
@RestController
@Slf4j
public class WeixinServiceImpl extends BaseApiService implements WeiXinService{
    @Override
    public Map<String, Object> getApp() {
        return setResultSuccessData(new WeixinEntity("xwj","123"));
    }

    @Override
    public Map<String, Object> getTestRibbon(Integer count) {
        log.info("访问weixin服务1，端口8300，这是第{}次请求。",count);
        return setResultSuccess();
    }
}
